<template>
  <div class="bargain_container">
    <div class="bargain_content" @click="gobargain">全民砍价 ></div>

    <van-card
      v-for="(item, index) in list"
      :key="index"
      :price="item.originalPrice"
      :desc="item.recommendStatusStr"
      :title="item.name"
      :origin-price="item.minPrice"
      :thumb="item.pic"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  methods: {
    gobargain() {
        this.$router.push("/bargainlist")
    },
  },
  mounted() {
    this.$API.getList().then((res) => {
      console.log(res);
      this.list = res.data.data.slice(10, 12);
    });
  },
};
</script>

<style scoped>
.bargain_container {
  width: 100%;
}
.bargain_content {
  width: 100%;
  height: 1rem;
  text-align: center;
  line-height: 1rem;
  border-bottom: 1px solid rgb(233, 229, 229);
}
</style>